<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加课程</title>
<link rel="stylesheet" href="../../easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../easyui/themes/icon.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css"
	media="screen" />
<link rel="stylesheet" type="text/css" href="../../css/Tooltip.css" />
<script src="../../myjs/market/potentialstudentManager.js"></script>
<script src="../../easyui/jquery-1.4.4.min.js"></script>
<script src="../../easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="../../myjs/myTab.js"></script>
<!-- sys -->
<script src="../../myjs/sys.js"></script>
<script src="../../myjs/DatePicker/WdatePicker.js"></script>
<script src="../../easyui/easyMask.js"></script>
<script src="../../easyui/easyUI.js"></script>
<script src="../../easyui/easyLayer.js"></script>
<style type="text/css">
<!--
.style2 {font-size: 18px}
-->
</style>
</head>
<body>
<script>
var realName='<%=session.getAttribute("realName")%>';
var sales_id = '<%=session.getAttribute("userId")%>'
var greyLayer ;
$(function(){
	grid = $('#tt').datagrid({
		url:'/pxglxt/potentialstudent/getPotentialstudents/',
		pagination:true,
		singleSelect:true,
		fit:true,//表格自动填充
		loadMsg:'正在努力为您加载，请稍作等待…',//加载信息
		toolbar:[{
			text:'新增',
			iconCls:'icon-add',
			handler:'newPotentialstudent'
		},'-',{
			text:'修改',
			iconCls:'icon-edit',
			handler:'editPotentialstudent'
			
		},'-',{
			text:'删除',
			iconCls:'icon-remove',
			handler:'delPotentialstudent'
		},'-',{text:'学员状态选择成功转入正式学员'}]
	});
	//初始化pagination工具开始
	var pagetool = $('#tt').datagrid('getPager');
	pagetool.pagination({				
			beforePageText:'第',
			afterPageText:'页，共{pages}页',
			displayMsg:'显示从 {from} 到  {to} , 总记录 {total} '});
	//初始化pagination工具结束
	$('body').layout();
	$('#btn-save,#btn-cancel').linkbutton();
	win = $('#user-window').window({
		collapsible:false,
		minimizable:false, 
		maximizable:false, 
		closable:true,
		onClose:function(){greyLayer.close();},
		closed:true
	});
	form = win.find('form');
	greyLayer = new easyMask(null,'100%','100%',100,'#000',8,true);
	
});
</script>
<div region="center" fit="true" style="padding: 5px;">
<table id="tt">
	<thead>
		<tr>
			<th field="ps_name" width="100%">潜在用户姓名</th>
			<th field="ps_sex" width="100%">性别</th>
			<th field="ps_sfzh" width="100%">身份证号</th>
			<th field="ps_birthday" width="100%">出生日期</th>
			<th field="ps_mobile" width="100%">联系方式</th>
			<th field="stu_type" width="100%">学员类型</th>
			<th field="ps_email" width="100%">email</th>
			<th field="ps_school" width="100%">就读学校</th>
			<th field="ps_mother_phone" width="100%">妈妈电话</th>
			<th field="ps_father_phone" width="100%">爸爸电话</th>
			<th field="ps_regist_time" width="100%">登记时间</th>
			<th field="media_name" width="100%">获知方式</th>
			<th field="unit_id" width="100%">校区</th>
			<th field="sales" width="100%">销售顾问</th>
			<th field="ps_desc" width="100%">备注</th>
		</tr>
	</thead>
</table>
</div>
<div id="user-window" title="潜在用户管理窗口"
	style="width: 580px; height: 430px;">
	<div style="padding: 10px 10px 10px 10px;">
<form method="post">
<table border="1" cellpadding="1" cellspacing="1" bordercolor="#E7E7E7">
  <tr align="center" valign="middle">
    <td align="center" bgcolor="#F6F6F6"><strong>姓名</strong></td>
    <td align="left"><input type="text" name="ps_name"
			id="ps_name" value="" maxlength="100" class="easyui-validatebox"
			required="true" 
			></td>
    <td align="center" bgcolor="#F6F6F6"><strong>性别</strong></td>
    <td align="left"><input class="easyui-combobox" name="ps_sex"
			url="sex.json" valueField="text" textField="text" multiple="false"
			panelHeight="auto" required="true"></input></td>
    <td rowspan="4" align="center"><img width="120px" height="118px"
			src="msn.gif" ondblclick=""></img></td>
  </tr>
  <tr align="center" valign="middle">
    <td align="center" bgcolor="#F6F6F6"><strong>学员类型 </strong></td>
    <td align="left"><input class="easyui-combobox" name="stu_type"
			url="/pxglxt/dic_customerstatus/getDicsForComb" valueField="dicvalue"
			textField="dicvalue" multiple="false" panelHeight="auto"
			required="true"></input></td>
    <td align="center" bgcolor="#F6F6F6"><strong>身份证号</strong></td>
    <td align="left"> <input type="text" name="ps_sfzh"
			id="ps_sfzh" value="" maxlength="100" class="easyui-validatebox"
			required="true" 
			></td>
  </tr>
  <tr align="center" valign="middle">
    <td align="center" bgcolor="#F6F6F6"><strong>出生日期 </strong></td>
    <td align="left"> <input type="text" class="Wdate1" size="32"
	name="ps_birthday" id="ps_birthday" value="" maxlength="10"
	onClick=WdatePicker();></td>
    <td align="center" bgcolor="#F6F6F6"><strong>电话 </strong></td>
    <td align="left"><input type="text" name="ps_mobile"
			id="ps_mobile" value="" maxlength="100" class="easyui-validatebox"
			required="true" 
			></td>
  </tr>
  <tr align="center" valign="middle">
    <td align="center" bgcolor="#F6F6F6"><strong>Email </strong></td>
    <td align="left"><input type="text"  name="ps_email"
			id="ps_email" value="" maxlength="100" class="easyui-validatebox"
			required="false" validType="email"
			></td>
    <td align="center" bgcolor="#F6F6F6"><strong>登记时间</strong></td>
    <td align="left"><input type="text" class="Wdate1" size="32"
	name="ps_regist_time" id="ps_regist_time" value="" maxlength="10"
	onClick=WdatePicker();></td>
  </tr>
    <tr align="center" valign="middle">
    <td align="center" bgcolor="#F6F6F6"><strong>就读学校</strong></td>
    <td align="left"><input type="text"  name="ps_school"
	id="ps_school" value="" maxlength="100" class="easyui-validatebox"
	required="false"
	></td>
    <td align="center" bgcolor="#F6F6F6"><strong>妈妈电话 </strong></td>
    <td colspan="2" align="left"><input type="text"  name="ps_mother_phone"
	id="ps_mother_phone" value="" maxlength="100" class="easyui-validatebox"
	required="false"
	></td>
  </tr>
  <tr align="center" valign="middle">
    <td align="center" bgcolor="#F6F6F6"><strong>爸爸电话</strong></td>
    <td align="left"><input type="text"  name="ps_father_phone"
	id="ps_father_phone" value="" maxlength="100" class="easyui-validatebox"
	required="false"
	></td>
    <td align="center" bgcolor="#F6F6F6"><strong>获知广告方式</strong></td>
    <td colspan="2" align="left"><input class="easyui-combobox"
			name="media_id" url="/pxglxt/dic_knowfrom/getDicsForComb"
			valueField="dickey" textField="dicvalue" multiple="false"
			panelHeight="auto" required="true"></input></td>
  </tr>
  <tr align="center" valign="middle">
    <td align="center" bgcolor="#F6F6F6"><strong>校区</strong></td>
    <td align="left"><input class="easyui-combobox" name="unit_id"
			url="/pxglxt/department/getUnits" valueField="unit_name"
			textField="unit_name" multiple="false" panelHeight="auto"
		 required="true"></input></td>
    <td align="center" bgcolor="#F6F6F6"><strong>销售顾问</strong></td>
    <td colspan="2" align="left"><input type="text" name="sales" id="sales"/><input type="hidden" name="sales_id" id="sales_id"/></td><!-- disabled="disabled" -->
  </tr>
  <tr align="center" valign="middle">
    <td align="center" bgcolor="#F6F6F6"><strong>备注</strong></td>
    <td colspan="4" align="left"><textarea name="ps_desc" id="ps_desc"
	class="easyui-validatebox" required="false"
	style="height: 100px; width: 460px; padding: 3px 5px; border: solid 1px #B8BFE9;"></textarea></td>
  </tr>
</table>
</form>
</div>
<div style="text-align: center; padding: 5px;"><a
	href="javascript:void(0)" onclick="savePotentialstudent()" id="btn-save"
	icon="icon-save">确定</a> <a href="javascript:void(0)"
	onclick="closeWindow()" id="btn-cancel" icon="icon-cancel">取消</a></div>
	</div>
</body>
</html>
